ds_map_add(global.warp,argument0,id);
warp_id = argument0;
warp_scn = argument1;
warp_type = argument2;

collision[0] = -1;
collision[1] = -1;
warp_collision = -4;
switch (warp_type)
{
case 0:
limit[0] = y;
limit[1] = y;
repeat (room_height)
{
if ((collision[0] < 0) && (limit[0] < room_height))
{
limit[0] += 8;
}
if ((collision[1] < 0) && (limit[1] > 0))
{
limit[1] -= 8;
}
collision[0] = instance_place(x,limit[0],obj_solid);
collision[1] = instance_place(x,limit[1],obj_solid);
}
if (collision[0] < 0)
{
collision[0] = id;
}
if (collision[1] < 0)
{
collision[1] = id;
}
break;
case 1:
limit[0] = x;
limit[1] = x;
repeat(room_width)
{
if ((collision[0] < 0) && (limit[0] < room_width))
{
limit[0] += 8;
}
if ((collision[1] < 0) && (limit[1] > 0))
{
limit[1] -= 8;
}
collision[0] = instance_place(limit[0],y,obj_solid);
collision[1] = instance_place(limit[1],y,obj_solid);
}
if (collision[0] < 0)
{
collision[0] = id;
}
if (collision[1] < 0)
{
collision[1] = id;
}
break;
}
